home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr04 / edv340.zip / EXTRACT.DOC < prev    next >
Text File  |  1992-12-09  |  3KB  |  58 lines

  1.                           Extract - a font extractor
  2.                          Written by Rick Owens,  1992
  3.  
  4. This program will attempt to extract a VGA/EGA font table from another file.
  5. This is handy for pulling a good looking font from within another file, such
  6. as a font loader, an 'impure' font file, etc.
  7.  
  8. This program is FREEWARE; you may use it without sending me (or anyone else,
  9. for that matter) any money.  I hope you will find it useful.
  10.  
  11. WARNING:  You use this program at your own risk.  If anything goes wrong, no
  12. one else shall be held responsible for any problems you encounter.
  13.  
  14. Usage:  EXTRACT infile outfile offset length
  15.  
  16. Where infile is the source file,
  17.       outfile is the file name for the raw font,
  18.       offset is the start of the font data within infile, and
  19.       length is the number of bytes in the font table.
  20.  
  21. The offset and length values are assumed to be hexadecimal; to enter the
  22. values in decimal, precede them with the letter 'u' (for unsigned int).  For
  23. example, '100' would be interpreted at 256 decimal, while 'U100' would be
  24. interpreted as 100 decimal.  (The case of the U doesn't matter.)
  25.  
  26. To find the values, use LIST or DEBUG or some other program that will provide
  27. a hex dump of the file.  Once the program finishes, you should have a font
  28. file that can be read by any program that will handle raw font files.  I
  29. recommend EDV, the VGA font editor I wrote (also freeware), but there are
  30. plenty of other ones around.
  31.  
  32. The program doesn't do any data analysis, so you can use it to extract other
  33. types of data, provided you know what part of a file you want to extract.
  34. For instance, if you find a particular font loader that you really like (or
  35. if you just want to collect 'em, and use different ones for different
  36. purposes), you can use Extract to pull the executable code out of the .COM
  37. file, then use the COPY command with the /b switch to combine the loader and
  38. the font of your choice.  Note that this will only work if 1) the new font is
  39. the same size as the old font, and 2) the font loader is a self contained
  40. chunk of code which can be prefixed to the raw font.  If those conditions
  41. are met, the command is:
  42.  
  43. copy /b loader.com+sample.fnt complete.com
  44.  
  45. Replace 'loader.com' with the name you used for the file which contains the
  46. executable code you extracted, replace 'sample.fnt' with the name of a raw
  47. font file, and replace 'complete.com' with the name you want for the
  48. completed program (loader + font).  (By the way, EDV can save fonts with a
  49. simple font loader prefixed, so you don't have to do all the messing
  50. around.)  I recommend that you store most of your fonts as raw files, and
  51. make self-loaders only as needed (e.g., for a non-literate friend).  In the
  52. case of 8x16 fonts, the extra few bytes of code means that you'll be using
  53. one more allocation unit per file.  That can translate to 2048k _or more_ of
  54. wasted space per file on a hard disk.
  55.  
  56. Note:  for obvious reasons, Extract can't do much with font loaders
  57. compressed with PKLite, Diet, or a similar program.
  58.